/* 全屏模式通用样式 */

/* 标准全屏模式 */
:fullscreen {
  background-color: white !important;
  background: white !important;
  width: 100vw !important;
  height: 100vh !important;
  color: initial !important;
}

/* Webkit浏览器(Chrome/Safari) */
:-webkit-full-screen {
  background-color: white !important;
  background: white !important;
  width: 100vw !important;
  height: 100vh !important;
  color: initial !important;
}

/* Firefox */
:-moz-full-screen {
  background-color: white !important;
  background: white !important;
  width: 100vw !important;
  height: 100vh !important;
  color: initial !important;
}

/* IE/Edge */
:-ms-fullscreen {
  background-color: white !important;
  background: white !important;
  width: 100vw !important;
  height: 100vh !important;
  color: initial !important;
}

/* 背景层样式 */
::backdrop {
  background-color: white !important;
  background: white !important;
}

::-webkit-backdrop {
  background-color: white !important;
  background: white !important;
}

/* 自定义全屏模式遮罩 */
:fullscreen::before,
:-webkit-full-screen::before,
:-moz-full-screen::before,
:-ms-fullscreen::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: white !important;
  z-index: -1;
}

/* 确保全屏内所有元素继承白色背景 */
:fullscreen *,
:-webkit-full-screen *,
:-moz-full-screen *,
:-ms-fullscreen * {
  background-color: inherit;
}

/* 针对Safari单独处理 */
@media not all and (min-resolution:.001dpcm) { 
  @supports (-webkit-appearance:none) {
    body:-webkit-full-screen,
    html:-webkit-full-screen,
    div:-webkit-full-screen {
      background-color: white !important;
      background: white !important;
    }
    
    .webkit-full-screen-ancestor {
      background-color: white !important;
      background: white !important;
    }
    
    .webkit-full-screen-ancestor * {
      background-color: white !important;
      background: white !important;
    }
  }
}

/* 修复图表和容器元素 */
.chart:fullscreen,
.chart:-webkit-full-screen,
.chart:-moz-full-screen,
.chart:-ms-fullscreen,
.chart-bar:fullscreen,
.chart-bar:-webkit-full-screen,
.chart-bar:-moz-full-screen,
.chart-bar:-ms-fullscreen,
.graph-container:fullscreen,
.graph-container:-webkit-full-screen,
.graph-container:-moz-full-screen,
.graph-container:-ms-fullscreen {
  background-color: white !important;
  background: white !important;
} 